Encrypted traffic inspection in a cloud-based security system

ABSTRACT

Systems and methods include, in a node operating as a snooping proxy, monitoring traffic between a user device and the Internet; detecting and monitoring a handshake between the user device and an endpoint for determining keys associated with encryption between the user device and the endpoint; monitoring encrypted traffic between the user device and the endpoint subsequent to the handshake based on the keys; and performing one or more security functions on the encrypted traffic based on the monitoring. The node can be part of a cloud-based security system and configured inline between the user device and the endpoint.

FIELD OF THE DISCLOSURE

The present disclosure relates generally to networking and computing.More particularly, the present disclosure relates to systems and methodsfor encrypted traffic inspection in a cloud-based security system, suchas Secure Sockets Layer (SSL), Transport Layer Security (TLS), DatagramTLS (DTLS), Hypertext Transfer Protocol Secure (HTTPS), and the like.

BACKGROUND OF THE DISCLOSURE

There has been significant growth in encrypted traffic on the Internet.For example, protocols such as SSL, TLS, DTLS, HTTPS, etc. are used toprovide privacy and data integrity. According to some forecasts, 70% ormore of all Web traffic now uses SSL, and these numbers are growing.Encrypted traffic presents a security hole, i.e., a blind spot.Enterprises conventionally have deployed appliances and other devices atthe network perimeter to perform security functions. In terms ofencrypted traffic, the appliances need to break the encryption in orderto monitor the traffic. This is resource intense, and conventionalappliances simply do not scale. As such, most enterprises simply foregothe inspection of encrypted traffic. Other studies have shown that themajority of malware today is hidden in encrypted traffic. Also,encrypted traffic presents a problem in terms of Data Loss Prevention(DLP) because sensitive data is typically concealed in SSL/TLS traffic,which is difficult and expensive to inspect (in terms of cost,processing capability, and latency). Without visibility and control,organizations are at an increased risk of data loss, due either tounintentional or malicious reasons. The conventional appliance andnetwork perimeter security approach is breaking down with the mobilityof users, the processing capability of user devices, etc. As such,security is moving to the cloud, namely as a service offered through acloud-based system.

There is a need for techniques for inspecting encrypted traffic in acloud-based security system.

BRIEF SUMMARY OF THE DISCLOSURE

The present disclosure relates to systems and methods for encryptedtraffic inspection in a cloud-based security system, such as SecureSockets Layer (SSL), Transport Layer Security (TLS), Hypertext TransferProtocol Secure (HTTPS), and the like. The cloud-based security systemis configured to monitor users in an inline manner as a proxy or SecureWeb or Internet Gateway, including monitoring encrypted traffic, e.g.,Secure Sockets Layer (SSL)/Transport Layer Security (TLS) traffic. Basedon this proxy by the design aspect of the cloud-based security system,the cloud-based security system can provide inspection on encryptedtraffic, such as SSL, TLS, DTLS, HTTPS, etc., without the inspectionlimitations of appliances. Various approaches are contemplated,including a snooping approach, a Man-in-the-Middle (MitM) proxyapproach, and the like. The snooping approach includes snooping sessionkeys and utilizing the snooped keys to non-intrusively monitor theencrypted traffic. Advantageously, this approach does not terminate theencrypted traffic. The MitM proxy approach has a cloud node that sits asa proxy between a user device and an endpoint where the proxy breaks theencrypted traffic in the middle. With the inspection of encryptedtraffic, the cloud-based security system can perform a full suite ofsecurity functions on the traffic.

The systems and methods include monitoring traffic between a user deviceand the Internet; detecting and monitoring a handshake between the userdevice and an endpoint for determining keys associated with encryptionbetween the user device and the endpoint; monitoring encrypted trafficbetween the user device and the endpoint subsequent to the handshakebased on the keys; and performing one or more security functions on theencrypted traffic based on the monitoring. The node can be part of acloud-based security system and configured inline between the userdevice and the endpoint.

BRIEF DESCRIPTION OF THE DRAWINGS

The present disclosure is illustrated and described herein withreference to the various drawings, in which like reference numbers areused to denote like system components/method steps, as appropriate, andin which:

FIG. 1 is a network diagram of a cloud-based system offering security asa service;

FIG. 2 is a network diagram of an example implementation of thecloud-based system;

FIG. 3 is a block diagram of a server that may be used in thecloud-based system of FIGS. 1 and 2 or the like;

FIG. 4 is a block diagram of a user device that may be used with thecloud-based system of FIGS. 1 and 2 or the like;

FIG. 5 is a network diagram of the cloud-based system illustrating anapplication on user devices with users configured to operate through thecloud-based system;

FIG. 6 is a flow diagram illustrating an example handshake for HTTPS todescribe a secure, encrypted tunnel between a client (e.g., the userdevice of FIG. 4) and a server (e.g., the server of FIG. 3);

FIG. 7 is a screenshot of packet capture showing SSL packets as they areexchanged between a client and a server;

FIG. 8 is a flow diagram illustrating an embodiment of SSL inspectionwith the cloud-based system as a proxy;

FIG. 9 is a flow diagram of details of an SSL handshake process betweenan SSL client and an SSL server;

FIG. 10 is a flow diagram of a process performing SSL interceptionthrough an interception proxy in the handshake process;

FIG. 11 is a network diagram of a network with an enforcement nodeoperating as an interception proxy to perform;

FIG. 12 is a network diagram of a network with the enforcement nodeoperating as a snooping proxy to perform SSL interception withoutbreaking the tunnel as with the interception proxy; and

FIG. 13 is a flowchart of a process for SSL (or other type of encryptedtraffic) inspection by snooping, such as via a node operating as thesnooping proxy.

DETAILED DESCRIPTION OF THE DISCLOSURE

Again, the present disclosure relates to systems and methods forencrypted traffic inspection in a cloud-based security system, such asSecure Sockets Layer (SSL), Transport Layer Security (TLS), HypertextTransfer Protocol Secure (HTTPS), Datagram TLS (DTLS), and the like. Thecloud-based security system is configured to monitor users in an inlinemanner as a proxy or Secure Web or Internet Gateway, includingmonitoring encrypted traffic, e.g., Secure Sockets Layer (SSL)/TransportLayer Security (TLS) traffic. Based on this proxy by the design aspectof the cloud-based security system, the cloud-based security system canprovide inspection on encrypted traffic, such as SSL, TLS, DTLS, HTTPS,etc., without the inspection limitations of appliances. Variousapproaches are contemplated, including a snooping approach, aMan-in-the-Middle (MitM) proxy approach, and the like. The snoopingapproach includes snooping session keys and utilizing the snooped keysto non-intrusively monitor the encrypted traffic. Advantageously, thisapproach does not terminate the encrypted traffic. The MitM proxyapproach has a cloud node that sits as a proxy between a user device andan endpoint where the proxy breaks the encrypted traffic in the middle.With the inspection of encrypted traffic, the cloud-based securitysystem can perform a full suite of security functions on the traffic.

Example Cloud-Based System Architecture

FIG. 1 is a network diagram of a cloud-based system 100 offeringsecurity as a service. Specifically, the cloud-based system 100 canoffer a Secure Internet and Web Gateway as a service to various users102, as well as other cloud services. In this manner, the cloud-basedsystem 100 is located between the users 102 and the Internet as well asany cloud services 106 (or applications) accessed by the users 102. Assuch, the cloud-based system 100 provides inline monitoring inspectingtraffic between the users 102, the Internet 104, and the cloud services106, including encrypted traffic such as SSL, TLS, DTLS, HTTPS, etc.traffic. Note, various functions described herein are attributed asbeing performed by the cloud-based system 100. Those skilled in the artwill recognize such functions can also be viewed as being performed viaa cloud service offered by the cloud-based system 100, as well as beingimplemented at one or more nodes in the cloud-based system 100.

The cloud-based system 100 can offer access control, threat prevention,data protection, etc. The access control can include a cloud-basedfirewall, cloud-based intrusion detection, Uniform Resource Locator(URL) filtering, bandwidth control, Domain Name System (DNS) filtering,etc. The threat prevention can include cloud-based intrusion prevention,protection against advanced threats (malware, spam, Cross-Site Scripting(XSS), phishing, etc.), cloud-based sandbox, antivirus, DNS security,etc. The data protection can include Data Loss Prevention (DLP), cloudapplication security such as via Cloud Access Security Broker (CASB),file type control, etc.

The cloud-based firewall can provide Deep Packet Inspection (DPI) andaccess controls across various ports and protocols as well as beingapplication and user aware. The URL filtering can block, allow, or limitwebsite access based on policy for a user, group of users, or entireorganization, including specific destinations or categories of URLs(e.g., gambling, social media, etc.). The bandwidth control can enforcebandwidth policies and prioritize critical applications such as relativeto recreational traffic. The DNS filtering can control and block DNSrequests against known and malicious destinations.

The cloud-based intrusion prevention and advanced threat protection candeliver full threat protection against malicious content such as browserexploits, scripts, identified botnets and malware callbacks, etc. Thecloud-based sandbox can block zero-day exploits (just identified) byanalyzing unknown files for malicious behavior. Advantageously, thecloud-based system 100 is multi-tenant and can service a large volume ofthe users 102. As such, newly discovered threats can be promulgatedthroughout the cloud-based system 100 for all tenants practicallyinstantaneously. The antivirus protection can include antivirus,antispyware, antimalware, etc. protection for the users 102, usingsignatures sourced and constantly updated. The DNS security can identifyand route command-and-control connections to threat detection enginesfor full content inspection.

The DLP can use standard and/or custom dictionaries to continuouslymonitor the users 102, including compressed and/or SSL-encryptedtraffic. Again, being in a cloud implementation, the cloud-based system100 can scale this monitoring with near-zero latency on the users 102.The cloud application security can include CASB functionality todiscover and control user access to known and unknown cloud services106. The file type controls enable true file type control by the user,location, destination, etc. to determine which files are allowed or not.

For illustration purposes, the users 102 of the cloud-based system 100can include a mobile device 110, a headquarters (HQ) 112 which caninclude or connect to a data center (DC) 114, Internet of Things (IoT)devices 116, a branch office 118, etc., and each includes one or moreuser devices (an example user device 300 is illustrated in FIG. 3). Thedevices 110, 116, and the locations 112, 114, 118 are shown forillustrative purposes, and those skilled in the art will recognize thereare various access scenarios and other users 102 for the cloud-basedsystem 100, all of which are contemplated herein. The users 102 can beassociated with a tenant, which may include an enterprise, acorporation, an organization, etc. That is, a tenant is a group of userswho share a common access with specific privileges to the cloud-basedsystem 100, a cloud service, etc. In an embodiment, the headquarters 112can include an enterprise's network with resources in the data center114. The mobile device 110 can be a so-called road warrior, i.e., usersthat are off-site, on-the-road, etc. Further, the cloud-based system 100can be multi-tenant, with each tenant having its own users 102 andconfiguration, policy, rules, etc. One advantage of the multi-tenancyand a large volume of users is the zero-day/zero-hour protection in thata new vulnerability can be detected and then instantly remediated acrossthe entire cloud-based system 100. The same applies to policy, rule,configuration, etc. changes—they are instantly remediated across theentire cloud-based system 100. As well, new features in the cloud-basedsystem 100 can also be rolled up simultaneously across the user base, asopposed to selective and time-consuming upgrades on every device at thelocations 112, 114, 118, and the devices 110, 116.

Logically, the cloud-based system 100 can be viewed as an overlaynetwork between users (at the locations 112, 114, 118, and the devices110, 106) and the Internet 104 and the cloud services 106. Previously,the IT deployment model included enterprise resources and applicationsstored within the data center 114 (i.e., physical devices) behind afirewall (perimeter), accessible by employees, partners, contractors,etc. on-site or remote via Virtual Private Networks (VPNs), etc. Thecloud-based system 100 is replacing the conventional deployment model.The cloud-based system 100 can be used to implement these services inthe cloud without requiring the physical devices and management thereofby enterprise IT administrators. As an ever-present overlay network, thecloud-based system 100 can provide the same functions as the physicaldevices and/or appliances regardless of geography or location of theusers 102, as well as independent of platform, operating system, networkaccess technique, network access provider, etc.

There are various techniques to forward traffic between the users 102 atthe locations 112, 114, 118, and via the devices 110, 116, and thecloud-based system 100. Typically, the locations 112, 114, 118 can usetunneling where all traffic is forward through the cloud-based system100. For example, various tunneling protocols are contemplated, such asGeneric Routing Encapsulation (GRE), Layer Two Tunneling Protocol(L2TP), Internet Protocol (IP) Security (IPsec), customized tunnelingprotocols, etc. The devices 110, 116, when not at one of the locations112, 114, 118 can use a local application that forwards traffic, a proxysuch as via a Proxy Auto-Config (PAC) file, and the like. A key aspectof the cloud-based system 100 is all traffic between the users 102 andthe Internet 104 or the cloud services 106 is via the cloud-based system100. As such, the cloud-based system 100 has visibility to enablevarious functions, all of which are performed off the user device in thecloud.

The cloud-based system 100 can also include a management system 120 fortenant access to provide global policy and configuration as well asreal-time analytics. This enables IT administrators to have a unifiedview of user activity, threat intelligence, application usage, etc. Forexample, IT administrators can drill-down to a per-user level tounderstand events and correlate threats, to identify compromiseddevices, to have application visibility, and the like. The cloud-basedsystem 100 can further include connectivity to an Identity Provider(IDP) 122 for authentication of the users 102 and to a SecurityInformation and Event Management (SIEM) system 124 for event logging.The system 124 can provide alert and activity logs on a per-user 102basis.

FIG. 2 is a network diagram of an example implementation of thecloud-based system 100. In an embodiment, the cloud-based system 100includes a plurality of enforcement nodes (EN) 150, labeled asenforcement nodes 150-1, 150-2, 150-N, interconnected to one another andinterconnected to a central authority (CA) 152. The nodes 150, 152,while described as nodes, can include one or more servers, includingphysical servers, virtual machines (VM) executed on physical hardware,etc. An example of a server is illustrated in FIG. 2. The cloud-basedsystem 100 further includes a log router 154 that connects to a storagecluster 156 for supporting log maintenance from the enforcement nodes150. The central authority 152 provide centralized policy, real-timethreat updates, etc. and coordinates the distribution of this databetween the enforcement nodes 150. The enforcement nodes 150 provide anonramp to the users 102 and are configured to execute policy, based onthe central authority 152, for each user 102. The enforcement nodes 150can be geographically distributed, and the policy for each user 102follows that user 102 as he or she connects to the nearest (or othercriteria) enforcement node 150.

The enforcement nodes 150 are full-featured secure internet gatewaysthat provide integrated internet security. They inspect all web trafficbi-directionally for malware and enforce security, compliance, andfirewall policies, as described herein. In an embodiment, eachenforcement node 150 has two main modules for inspecting traffic andapplying policies: a web module and a firewall module. The enforcementnodes 150 are deployed around the world and can handle hundreds ofthousands of concurrent users with millions of concurrent sessions.Because of this, regardless of where the users 102 are, they can accessthe Internet 104 from any device, and the enforcement nodes 150 protectthe traffic and apply corporate policies. The enforcement nodes 150 canimplement various inspection engines therein, and optionally, sendsandboxing to another system. The enforcement nodes 150 includesignificant fault tolerance capabilities, such as deployment inactive-active mode to ensure availability and redundancy as well ascontinuous monitoring.

In an embodiment, customer traffic is not passed to any other componentwithin the cloud-based system 100, and the enforcement nodes 150 can beconfigured to never store any data to disk. Packet data is held inmemory for inspection and then, based on policy, is either forwarded ordropped. Log data generated for every transaction is compressed,tokenized, and exported over secure TLS connections to the log routers154 that direct the logs to the storage cluster 156, hosted in theappropriate geographical region, for each organization.

The central authority 152 hosts all customer (tenant) policy andconfiguration settings. It monitors the cloud and provides a centrallocation for software and database updates and threat intelligence.Given the multi-tenant architecture, the central authority 152 isredundant and backed up in multiple different data centers. Theenforcement nodes 150 establish persistent connections to the centralauthority 152 in order to download all policy configurations. When a newuser connects to an enforcement node 150, a policy request is sent tothe central authority 152 through this connection. The central authority152 then calculates the policies that apply to that user 102 and sendsthe policy to the enforcement node 150 as a highly compressed bitmap.

Once downloaded, a tenant's policy is cached until a policy change ismade in the management system 120. When this happens, all of the cachedpolicies are purged, and the enforcement nodes 150 request the newpolicy when the user 102 next makes a request. In an embodiment, theenforcement node 150 exchange “heartbeats” periodically, so allenforcement nodes 150 are informed when there is a policy change. Anyenforcement node 150 can then pull the change in policy when it sees anew request.

The cloud-based system 100 can be a private cloud, a public cloud, acombination of a private cloud and a public cloud (hybrid cloud), or thelike. Cloud computing systems and methods abstract away physicalservers, storage, networking, etc., and instead offer these as on-demandand elastic resources. The National Institute of Standards andTechnology (NIST) provides a concise and specific definition whichstates cloud computing is a model for enabling convenient, on-demandnetwork access to a shared pool of configurable computing resources(e.g., networks, servers, storage, applications, and services) that canbe rapidly provisioned and released with minimal management effort orservice provider interaction. Cloud computing differs from the classicclient-server model by providing applications from a server that areexecuted and managed by a client's web browser or the like, with noinstalled client version of an application required. Centralizationgives cloud service providers complete control over the versions of thebrowser-based and other applications provided to clients, which removesthe need for version upgrades or license management on individual clientcomputing devices. The phrase “Software as a Service” (SaaS) issometimes used to describe application programs offered through cloudcomputing. A common shorthand for a provided cloud computing service (oreven an aggregation of all existing cloud services) is “the cloud.” Thecloud-based system 100 is illustrated herein as an example embodiment ofa cloud-based system, and other implementations are also contemplated.

As described herein, the terms cloud services and cloud applications maybe used interchangeably. The cloud service 106 is any service madeavailable to users on-demand via the Internet, as opposed to beingprovided from a company's on-premises servers. A cloud application, orcloud app, is a software program where cloud-based and local componentswork together. The cloud-based system 100 can be utilized to provideexample cloud services, including Zscaler Internet Access (ZIA), ZscalerPrivate Access (ZPA), and Zscaler Digital Experience (ZDX), all fromZscaler, Inc. (the assignee and applicant of the present application).The ZIA service can provide the access control, threat prevention, anddata protection described above with reference to the cloud-based system100. ZPA can include access control, microservice segmentation, etc. TheZDX service can provide monitoring of user experience, e.g., Quality ofExperience (QoE), Quality of Service (QoS), etc., in a manner that cangain insights based on continuous, inline monitoring. For example, theZIA service can provide a user with Internet Access, and the ZPA servicecan provide a user with access to enterprise resources in lieu oftraditional Virtual Private Networks (VPNs), namely ZPA provides ZeroTrust Network Access (ZTNA). Those of ordinary skill in the art willrecognize various other types of cloud services 106 are alsocontemplated. Also, other types of cloud architectures are alsocontemplated, with the cloud-based system 100 presented for illustrationpurposes.

Example Server Architecture

FIG. 3 is a block diagram of a server 200, which may be used in thecloud-based system 100, in other systems, or standalone. For example,the enforcement nodes 150 and the central authority 152 may be formed asone or more of the servers 200. The server 200 may be a digital computerthat, in terms of hardware architecture, generally includes a processor202, input/output (I/O) interfaces 204, a network interface 206, a datastore 208, and memory 210. It should be appreciated by those of ordinaryskill in the art that FIG. 3 depicts the server 200 in an oversimplifiedmanner, and a practical embodiment may include additional components andsuitably configured processing logic to support known or conventionaloperating features that are not described in detail herein. Thecomponents (202, 204, 206, 208, and 210) are communicatively coupled viaa local interface 212. The local interface 212 may be, for example, butnot limited to, one or more buses or other wired or wirelessconnections, as is known in the art. The local interface 212 may haveadditional elements, which are omitted for simplicity, such ascontrollers, buffers (caches), drivers, repeaters, and receivers, amongmany others, to enable communications. Further, the local interface 212may include address, control, and/or data connections to enableappropriate communications among the aforementioned components.

The processor 202 is a hardware device for executing softwareinstructions. The processor 202 may be any custom made or commerciallyavailable processor, a Central Processing Unit (CPU), an auxiliaryprocessor among several processors associated with the server 200, asemiconductor-based microprocessor (in the form of a microchip orchipset), or generally any device for executing software instructions.When the server 200 is in operation, the processor 202 is configured toexecute software stored within the memory 210, to communicate data toand from the memory 210, and to generally control operations of theserver 200 pursuant to the software instructions. The I/O interfaces 204may be used to receive user input from and/or for providing systemoutput to one or more devices or components.

The network interface 206 may be used to enable the server 200 tocommunicate on a network, such as the Internet 104. The networkinterface 206 may include, for example, an Ethernet card or adapter or aWireless Local Area Network (WLAN) card or adapter. The networkinterface 206 may include address, control, and/or data connections toenable appropriate communications on the network. A data store 208 maybe used to store data. The data store 208 may include any of volatilememory elements (e.g., random access memory (RAM, such as DRAM, SRAM,SDRAM, and the like)), nonvolatile memory elements (e.g., ROM, harddrive, tape, CDROM, and the like), and combinations thereof. Moreover,the data store 208 may incorporate electronic, magnetic, optical, and/orother types of storage media. In one example, the data store 208 may belocated internal to the server 200, such as, for example, an internalhard drive connected to the local interface 212 in the server 200.Additionally, in another embodiment, the data store 208 may be locatedexternal to the server 200 such as, for example, an external hard driveconnected to the I/O interfaces 204 (e.g., SCSI or USB connection). In afurther embodiment, the data store 208 may be connected to the server200 through a network, such as, for example, a network-attached fileserver.

The memory 210 may include any of volatile memory elements (e.g., randomaccess memory (RAM, such as DRAM, SRAM, SDRAM, etc.)), nonvolatilememory elements (e.g., ROM, hard drive, tape, CDROM, etc.), andcombinations thereof. Moreover, the memory 210 may incorporateelectronic, magnetic, optical, and/or other types of storage media. Notethat the memory 210 may have a distributed architecture, where variouscomponents are situated remotely from one another but can be accessed bythe processor 202. The software in memory 210 may include one or moresoftware programs, each of which includes an ordered listing ofexecutable instructions for implementing logical functions. The softwarein the memory 210 includes a suitable Operating System (O/S) 214 and oneor more programs 216. The operating system 214 essentially controls theexecution of other computer programs, such as the one or more programs216, and provides scheduling, input-output control, file and datamanagement, memory management, and communication control and relatedservices. The one or more programs 216 may be configured to implementthe various processes, algorithms, methods, techniques, etc. describedherein.

Example User Device Architecture

FIG. 4 is a block diagram of a user device 300, which may be used withthe cloud-based system 100 or the like. Specifically, the user device300 can form a device used by one of the users 102, and this may includecommon devices such as laptops, smartphones, tablets, netbooks, personaldigital assistants, MP3 players, cell phones, e-book readers, IoTdevices, servers, desktops, printers, televisions, streaming mediadevices, and the like. The user device 300 can be a digital device that,in terms of hardware architecture, generally includes a processor 302,I/O interfaces 304, a network interface 306, a data store 308, andmemory 310. It should be appreciated by those of ordinary skill in theart that FIG. 4 depicts the user device 300 in an oversimplified manner,and a practical embodiment may include additional components andsuitably configured processing logic to support known or conventionaloperating features that are not described in detail herein. Thecomponents (302, 304, 306, 308, and 302) are communicatively coupled viaa local interface 312. The local interface 312 can be, for example, butnot limited to, one or more buses or other wired or wirelessconnections, as is known in the art. The local interface 312 can haveadditional elements, which are omitted for simplicity, such ascontrollers, buffers (caches), drivers, repeaters, and receivers, amongmany others, to enable communications. Further, the local interface 312may include address, control, and/or data connections to enableappropriate communications among the aforementioned components.

The processor 302 is a hardware device for executing softwareinstructions. The processor 302 can be any custom made or commerciallyavailable processor, a CPU, an auxiliary processor among severalprocessors associated with the user device 300, a semiconductor-basedmicroprocessor (in the form of a microchip or chipset), or generally anydevice for executing software instructions. When the user device 300 isin operation, the processor 302 is configured to execute software storedwithin the memory 310, to communicate data to and from the memory 310,and to generally control operations of the user device 300 pursuant tothe software instructions. In an embodiment, the processor 302 mayinclude a mobile optimized processor such as optimized for powerconsumption and mobile applications. The I/O interfaces 304 can be usedto receive user input from and/or for providing system output. Userinput can be provided via, for example, a keypad, a touch screen, ascroll ball, a scroll bar, buttons, a barcode scanner, and the like.System output can be provided via a display device such as a LiquidCrystal Display (LCD), touch screen, and the like.

The network interface 306 enables wireless communication to an externalaccess device or network. Any number of suitable wireless datacommunication protocols, techniques, or methodologies can be supportedby the network interface 306, including any protocols for wirelesscommunication. The data store 308 may be used to store data. The datastore 308 may include any of volatile memory elements (e.g., randomaccess memory (RAM, such as DRAM, SRAM, SDRAM, and the like)),nonvolatile memory elements (e.g., ROM, hard drive, tape, CDROM, and thelike), and combinations thereof. Moreover, the data store 308 mayincorporate electronic, magnetic, optical, and/or other types of storagemedia.

The memory 310 may include any of volatile memory elements (e.g., randomaccess memory (RAM, such as DRAM, SRAM, SDRAM, etc.)), nonvolatilememory elements (e.g., ROM, hard drive, etc.), and combinations thereof.Moreover, the memory 310 may incorporate electronic, magnetic, optical,and/or other types of storage media. Note that the memory 310 may have adistributed architecture, where various components are situated remotelyfrom one another, but can be accessed by the processor 302. The softwarein memory 310 can include one or more software programs, each of whichincludes an ordered listing of executable instructions for implementinglogical functions. In the example of FIG. 3, the software in the memory310 includes a suitable operating system 314 and programs 316. Theoperating system 314 essentially controls the execution of othercomputer programs and provides scheduling, input-output control, fileand data management, memory management, and communication control andrelated services. The programs 316 may include various applications,add-ons, etc. configured to provide end-user functionality with the userdevice 300. For example, example programs 316 may include, but notlimited to, a web browser, social networking applications, streamingmedia applications, games, mapping and location applications, electronicmail applications, financial applications, and the like. In a typicalexample, the end-user typically uses one or more of the programs 316along with a network such as the cloud-based system 100.

User Device Application for Traffic Forwarding and Monitoring

FIG. 5 is a network diagram of the cloud-based system 100 illustratingan application 350 on user devices 300 with users 102 configured tooperate through the cloud-based system 100. Different types of userdevices 300 are proliferating, including Bring Your Own Device (BYOD) aswell as IT-managed devices. The conventional approach for a user device300 to operate with the cloud-based system 100 as well as for accessingenterprise resources includes complex policies, VPNs, poor userexperience, etc. The application 350 can automatically forward usertraffic with the cloud-based system 100 as well as ensuring thatsecurity and access policies are enforced, regardless of device,location, operating system, or application. The application 350automatically determines if a user 102 is looking to access the openInternet 104, a SaaS app, or an internal app running in public, private,or the datacenter and routes mobile traffic through the cloud-basedsystem 100. The application 350 can support various cloud services,including ZIA, ZPA, ZDX, etc., allowing the best in class security withzero trust access to internal apps.

The application 350 is configured to auto-route traffic for seamlessuser experience. This can be protocol as well as application-specific,and the application 350 can route traffic with a nearest or best fitenforcement node 150. Further, the application 350 can detect trustednetworks, allowed applications, etc. and support secure network access.The application 350 can also support the enrollment of the user device300 prior to accessing applications. The application 350 can uniquelydetect the users 102 based on fingerprinting the user device 300, usingcriteria like device model, platform, operating system, etc. Theapplication 350 can support Mobile Device Management (MDM) functions,allowing IT personnel to seamlessly deploy and manage the user devices300. This can also include automatic installation of client and SSLcertificates or another type of certificate during enrollment. Finally,the application 350 provides visibility into device and app usage of theuser 102 of the user device 300.

The application 350 supports a secure, lightweight tunnel between theuser device 300 and the cloud-based system 100. For example, thelightweight tunnel can be HTTP-based. With the application 350, there isno requirement for PAC files, an IPSec VPN, authentication cookies, orend user 102 setup.

SSL Overview

Secure Sockets Layer (SSL) is a client-server protocol that creates asecure channel over the Internet. SSL is used to validate the identityof the destination server and (optionally) the client, and to encryptinformation sent across the internet between the client and server. FIG.6 is a flow diagram illustrating an example handshake for HTTPS todescribe a secure, encrypted tunnel between a client (e.g., the userdevice 300) and a server (e.g., the server 200). When a client, such asa browser, first sends an HTTPS request to a server, it starts a seriesof message exchanges called the SSL handshake. The client can send anHTTPS request with supported cipher suites and compression algorithms,session ID, SSL version, and a randomly generated value, i.e., a “clienthello.”

The server sends its digital certificate to the client to authenticateitself, as well as the selected cipher suite and compression algorithm,session ID, SSL session, a randomly generated value, a certificate witha public key, and optionally a request for the client's certificate,i.e., a “server hello.” The client verifies the certificate with aCertificate Authority (CA), sends the pre-master secret computed withboth random values, and encrypted with the server's public key. Theclient notifies the server that all subsequent messages will beencrypted with the keys and negotiated algorithms, i.e., the client andserver agree on the SSL protocol version and algorithms to use, and theclient and server generate the symmetric keys they will use to encrypttheir messages.

The server uses its private key to decrypt the pre-master key, only theserver with the private key that matches the public key that was sentwith the certificate can decrypt the pre-master key. The servervalidates the browser (client) certificate and uses the public key todecrypt the messages. The server notifies the client that all subsequentmessages will be encrypted using the keys and negotiated algorithms. Theserver computes the master key from the pre-master key and generates thesession key. The server sends a message that is a hash of the exchangedmessages using the master key and the session key. The client decryptsthe message and validates the hash, leading to a successful handshake.

After the SSL handshake is successfully completed, the client and servercontinue with the standard HTTP communications in a secure manner.

FIG. 7 is a screenshot of packet capture showing SSL packets as they areexchanged between a client and a server. The client sends its HTTPSrequest in the Client Hello. The entire HTTPS message is encrypted,including the headers and the request/response load. The actual hostnameand domain name being accessed is not visible. How the cloud-basedsystem 100 determines the destination hostname depends on whether it isoperating in transparent mode or explicit mode. The server responds withits Hello message and its certificate. (A certificate is an electronicform that verifies the identity and public key of the subject of thecertificate.) SSL uses the Public Key Infrastructure (PKI) to ensure thetrustworthiness of the certificates. The client and server continue withthe SSL negotiation. After the SSL tunnel is established, theapplication data is sent securely through the tunnel.

SSL uses Public Key Infrastructure (PKI) to ensure the trustworthinessof the certificates. PKI uses a trusted third party, called aCertificate Authority (CA), to guarantee the identity of an entity. Whena CA verifies an entity's identity, it uses an algorithm, such as RSA,to generate a public and private key. It gives the private key to therequesting entity, and the public key is made available to the public.To authenticate itself to another party, the entity uses its private keyto encrypt its certificate, and the other party uses the correspondingpublic key to decrypt it.

A CA issues certificates in a tree structure, with the root certificateas the top-most certificate. The CA signs the root certificate, which isconsidered trustworthy in many software applications, such as webbrowsers. Web browsers have the root certificates of many CAs.

A root certificate can sign and designate a certificate as anintermediate CA certificate, which can sign and designate othercertificates as intermediate certificates as well. A certificate chainrefers to the list of certificates that complete the chain of trust,from the trusted root CA certificate to any intermediate certificatesand the certificate of an entity. The following is an example of acertificate chain.

The certificate of mail.google.com was signed by Google InternetAuthority G2. The certificate of Google Internet Authority G2 was signedby GeoTrust Global CA. The certificate of GeoTrust Global was signed byEquifax Secure Certificate Authority. The certificate of GeoTrust GlobalCA and Equifax Secure Certificate Authority are in the certificate storeof the browser.

Perfect Forward Secrecy (PFS)

Perfect Forward Secrecy (PFS) is a feature of secure communicationprotocols that prevent compromised session keys. In the commonly usedRSA key exchange, SSL sessions between the client and web server areencrypted with the public key and decrypted with the private key. Ifattackers access the server's private key, they can uncover the sessionkeys and decrypt all conversations from past and future sessions.

In contrast, PFS uses either the standard Diffie-Hellman ephemeral keyexchange (DHE) or the Elliptic Curve Diffie-Hellman ephemeral keyexchange (ECDHE). DHE uses public-key cryptography, which generates keyswith modular arithmetic. In DHE, there is not a link between theserver's private key and session key, so the confidentiality of sessionkeys are not dependent on the private keys. If attackers access theserver's private key, they are unable to uncover the session key anddecrypt the conversation. Furthermore, the server generates differentsession keys for each conversation with the client. If attackerscompromise the session key, they are only able to decrypt theconversation for that particular session. To decrypt all conversations,they must compromise the session keys for every session.

ECDHE is like DHE but uses elliptic-curve cryptography. Elliptic-curvecryptography generates keys using algebraic curves. It is significantlyfaster than DHE and provides better performance. Elliptic-curvecryptography achieves equivalent security as RSA with smaller keys.

SSL Inspection

HTTPS is an aggregate of HTTP and the SSL/TLS protocol, wherein theauthentication and encryption capabilities of SSL/TLS protect HTTPcommunications. This is vital because the information that is sent onthe Internet is passed along from one device to another before itreaches the destination server. Therefore, sensitive information, suchas credit card numbers, usernames, and passwords, may be seen byintermediate devices if the information is sent in clear text over HTTP.When the information is encrypted and protected by the SSL protocol,only the intended recipient can read the information.

Unfortunately, the security provided by SSL is also being misused in anumber of ways:

SSL encryption is used to hide dangerous content such as viruses,software, and other malware.

Attackers build their websites with SSL encryption.

Attackers inject their malicious content into well-known and trustedSSL-enabled sites.

SL can be used to hide data leakage, for example, the transmission ofsensitive financial documents from an organization or the like.

SSL can be used to hide the browsing of websites that belong tolegal-liability classes.

As more and more websites use HTTPS, including social media, the abilityto control and inspect traffic to and from these sites has become animportant piece of the security posture of an organization.

The cloud-based system 100 can inspect HTPS traffic from anorganization. The service can scan data transactions and apply policiesto it, as described herein. An enforcement node 150 can function as afull SSL proxy, or SSL man-in-the-middle (MITM) proxy.

The cloud-based system 100 can provide two options to protect HTTPStraffic: SSL inspection, or if SSL inspection is not feasible, one canconfigure a global block of specific HTTPS content.

FIG. 8 is a flow diagram illustrating an embodiment of SSL inspection380 with the cloud-based system 100 as a proxy. In this embodiment, thecloud-based system 100 establishes a separate SSL tunnel with the user'sbrowser and with the destination server. FIG. 8 illustrates the SSLinspection 380 process. First, a user (at the user device 300) opens abrowser and sends an HTTPS request. Second, the cloud-based system 100intercepts the HTTPS request. Through a separate SSL tunnel, thecloud-based system 100 sends its HTTPS request to the destination server(the server 200) and conducts SSL negotiations. The destination serversends the cloud-based system 100 its certificate with its public key.The cloud-based system 100 and destination server complete the SSLhandshake. The application data and subsequent messages are sent throughthe SSL tunnel. The cloud-based system 100 conducts SSL negotiationswith the user's browser. It sends the browser an intermediatecertificate or an organization's custom intermediate root as well as aserver certificate signed by the intermediate CA. The browser validatesthe certificate chain in the browser's certificate store. Thecloud-based system 100 and the browser complete the SSL handshake. Theapplication data and subsequent messages are sent through the SSLtunnel.

In an embodiment, the SSL inspection can use an intermediate certificateof the cloud-based system 100. With this option, the cloud-based system100 dynamically generates and signs the server certificate that itpresents to the client. This certificate contains the same fields as theoriginal destination server certificate, except for the identifyinginformation of the issuer, called the issuer distinguished name (ON).The issuer DN is set to the name of the cloud-based system 100intermediate certificate. The browser receives this certificate signedby the cloud-based system 100 intermediate certificates along with thecloud-based system 100 intermediate certificate. To enable a browser orsystem to automatically trust all certificates signed by the cloud-basedsystem 100 Certificate Authority, users must install the cloud-basedsystem 100 Root CA certificate on their workstations.

In another embodiment, the SSL inspection can use a custom intermediateroot certificate. One can subscribe to the Custom Certificate featureand configure a custom intermediate root certificate for SSL inspection.Here, the cloud-based system 100 does not use an organization's rootcertificate or private keys. Instead, it uses the custom intermediateroot certificate signed by a trusted CA, so it is possible to use a CAthat is already deployed on an organization's machines. To configure anintermediate root certificate, the cloud-based system 100 generates aCertificate Signing Request (CSR) with a key pair (i.e., public andprivate key) and encrypts the private key using AES. The private key isstored securely in the central authority 152, while the CSR contains thepublic key.

After the CA signs the CSR, the signed certificate can be uploaded tothe cloud-based system 100. During the SSL negotiation with the user'sbrowser, the cloud-based system 100 dynamically generates and signs theserver certificate that it presents to the client with this intermediatecertificate. The certificate issuer is set to the organization name, andthe cloud-based system 100 generates the certificate once per site andcaches these certificates on the enforcement node 150. These cachedcertificates are usually valid until their expiration date.

In addition to the intermediate root certificate, it is possible toupload the certificate chain that includes any other intermediatecertificates that complete the chain to the intermediate rootcertificate. When the certificate chain is uploaded, the cloud-basedsystem 100 sends the intermediate root certificate along with this keychain and the signed server certificate to the users' machines duringSSL inspection. If the certificate chain is not uploaded, thecloud-based system 100 sends only the organization's intermediate rootcertificate and its signed server certificate to the user's machine.Uploading the certificate chain provides important benefits. Thecertificate chain ensures that the users' machines can validate theserver certificate signed by the organization's intermediate CA even ifthe users' browsers have only the root certificate in their certificatestore. If the certificate is changed due to the compromise of anintermediate root certificate, or simply as a routine security measure,the ability to send the certificate chain to users' machines during SSLinspection is a key benefit. Because it enables certificate rotationefficiently without the need for a new key ceremony or certificate pushto an organization's users.

The cloud-based system 100 provides a CRL (Certificate Revocation List)distribution point (CDP) for every certificate it generates so thatclient applications can locate the Certificate Revocation Lists (CRLs)as necessary.

SSL Handshake Process

FIG. 9 is a flow diagram of details of an SSL handshake process 400between an SSL client 402 and an SSL server 404. The SSL client 402 canbe the user device 300, etc. and the SSL server 404 can be a location onthe Internet 104, etc., i.e., the server 200. That is, the SSL server404 can be an endpoint for an encrypted tunnel with the user device 300.The SSL client 402 sends a “client hello” message that listscryptographic information such as the SSL version and, in the client'sorder of preference, the CipherSuites supported by the SSL client 402(step 410-1). The message also contains a random byte string that isused in subsequent computations. The protocol allows for the “clienthello” to include the data compression methods supported by the SSLclient 402.

The SSL server 404 responds with a “server hello” message that containsthe CipherSuite chosen by the SSL server 404 from the list provided bythe SSL client 402, the session ID, and another random byte string (step410-2). The SSL server 404 also sends its digital certificate. If theSSL server 404 requires a digital certificate for client authentication,the SSL server 404 sends a “client certificate request” that includes alist of the types of certificates supported and the Distinguished Namesof acceptable CAs. The SSL client 402 verifies the SSL server's 404digital certificate (step 410-3).

The SSL client 402 sends the random byte string that enables both theSSL client 402 and the SSL server 404 to compute the secret key to beused for encrypting subsequent message data (step 410-4). The randombyte string itself is encrypted with the SSL server's 404 public key. Ifthe SSL server 404 sent a “client certificate request,” the SSL client402 sends a random byte string encrypted with the client's private key,together with the SSL client's 402 digital certificate, or a “no digitalcertificate alert” (step 410-5). This alert is only a warning, but withsome implementations, the handshake fails if client authentication ismandatory. The SSL server 404 verifies the client's certificate ifrequired (step 410-6).

The SSL client 402 sends the server a “finished” message, which isencrypted with the secret key, indicating that the SSL client 402 partof the handshake is complete (step 410-7). The SSL server 404 sends theSSL client 402 a “finished” message, which is encrypted with the secretkey, indicating that the SSL server 404 part of the handshake iscomplete. For the duration of the SSL session, the SSL server 404 andSSL client 402 can now exchange messages that are symmetricallyencrypted with the shared secret key (step 410-9).

SSL Interception Proxies

FIG. 10 is a flow diagram of a process 500 performing SSL interceptionthrough an interception proxy 510 in the handshake process 400. Theinterception proxy 510 can be one of the enforcement nodes 150 in thecloud-based system 100. Enterprises deploy or use the interception proxy510 to secure themselves from SSL-based threats, which are increasinglycommon. The interception proxy 510 works by acting as a MitM andmodifying the encrypted channel. Whenever the SSL client 402 initiates aconnection to a remote SSL server 404, the interception proxy 510 willintercept it and open two different channels of communication, one withthe SSL client 402 and the other with the SSL server 404 that the SSLclient 402 intended to talk to in the first place. This allows theinterception proxy 510 to actively modify/inject the content from theSSL client 402 to the SSL server 404 or vice versa. This allows ITadmins to perform malware scanning and other security functions on theotherwise encrypted content. In order to achieve this, an IT adminusually deploys proxy's ROOT CA certificate on the user devices 300 forthe SSL clients 402 to trust the handshake which happens between the SSLclient 402 and the interception proxy 510 which generates a certificatefor every SSL server 404 that the SSL client 402 tries to communicatewith. This naturally breaks with apps that employ certificate pinningfor enhanced security.

Advantageously, the interception proxy 510 enables interception,inspection, and filtering of content on an otherwise encrypted channel.For example, the cloud-based system 100 using the interception proxy 510can perform DLP, web content filtering, malware detection, intrusiondetection/prevention, firewall and Deep Packet Inspection (DPI), etc.The interception proxy 510 acts as the SSL client 402 on the SSL server404 side and as the SSL server 404 on the SSL client 402 sides.

The interception proxy 510 performs SSL inspection by breaking orterminating the encrypted tunnel in the cloud-based system 100.Specifically, the enforcement node 150 is a proxy, and it has anencrypted tunnel with the client and another encrypted tunnel with theserver. That is, this approach requires SSL/TLS/DTLShandshake/termination on the enforcement node 150 (in the cloud,on-premises, etc.). This approach, with the enforcement node 150 as aMitM proxy breaking the tunnel has limitations. Specifically, someapplications use Certificate Pinning or other techniques to preventMitM. With Certificate Pinning, the client is configured to only accepta specific certificate or a specific CA. In this case, the applicationwill break when presented with a certificate signed by the cloud-basedsystem 100, even if it is trusted.

This is done to ensure greater control over the communicating entitiesand to prevent the MitM attacks. The situation is somewhat of a paradox:entities such as Domain Name Systems (DNS) and CAs are trusted andsupposed to supply trusted input. However, more and more applicationsare trying hard with pinning to eliminate this conference of trust. Bypinning the certificate or the public key of the server certificate, anapplication no longer needs to depend on third-party entities such asDNS, CA, etc. when making security decisions relating to a peer'sidentity. This makes an app immune to MitM attacks. Pinning effectivelyremoves the “conference of trust” by eliminating the set of entitiesthat are beyond the control of a domain owner. Apps achieve this byaccepting server certificates that strictly match a defined criterion,usually subject key information.

With the SSL interception, proxy servers are employed in the cloud-basedsystem 100 are aware of the SSL encrypted communication and may need tointercept it in order to provide security services. Such filteringsolutions are generally achieved through interception proxies thatengage in deep packet inspection to resist SSL-based threats that mayrange from trivial viruses to sophisticated ransomware. The problem whenapps employ certificate pinning is that they reject the connectionduring negotiation with an interception proxy on account of peer's (inthis case, SSL proxy) untrusted certificate.

Such apps fail to function in the enterprise environment and fail toprovide desired services leading to bad user experience and frustration.The apps would be rendered dysfunctional partially or completely due tothe certificate pinning employed by them. They will terminate theconnection upon receiving a server certificate from the proxy that doesnot match the criterion. This leads to bad user experience, and thecloud security system does not have any visibility or resolution of suchissues.

As more and more viruses use encrypted channels to infect machines, itis imperative for enterprises to employ SSL interception proxies toprotect users. This poses a conundrum as app developers would like toeliminate trust on third parties like CAs, which may be vulnerable toother attacks. To solve this issue, an IT admin may be lured to turn SSLinterception off, which makes their enterprise security even worse.Hence, it is desirable for IT admins to selectively turn SSLinterception off only for some trusted applications and domains. Sinceit is very hard for IT admins to know apriori which apps users will useor what domains the app may hit, which may even change over time, thereis a huge need for a better tunneling solution.

The cloud-based system 100 has little or no idea about the dysfunctionalapps. The client apps terminate the connection with or without an alertmessage to the server upon receiving the mismatched certificate.Further, the IT admin has no way to find all the apps and their serverdomains for which the app performs pinning. As a result, this designdoes not allow the users to use such apps while subscribing to thesecurity or enterprise compliance policies. To make these appsfunctional again, the cloud-based system 100 cannot perform the SSLinterception described in FIG. 8, e.g., bypass SSL interception.

SSL Interception

FIG. 11 is a network diagram of a network 600 with the enforcement node150 configured as an interception proxy 510. As such, an interceptionproxy 510 in the cloud-based system 100 can selectively intercept SSLcommunications. In an embodiment, Internet-bound traffic of the userdevice 300 (the SSL client 402) is controlled through a tunnel 610 tothe cloud-based system 100 which has a second tunnel 612 to the SSLserver 404. The tunnel 610 acts as an intermediary passive MitM proxythat relays all the network requests and responses from clientapplications 620 to the cloud-based system 100. To achieve this, aprocess running on the host (the SSL client 402) installs a virtualinterface on the user device 300. The process installs a default routeon the interface in the device routing table and opens listening socketsfor User Datagram Protocol (UDP) and Transmission Control Protocol (TCP)traffic at randomly available ports.

SSL Inspection Based on Key Snooping

FIG. 12 is a network diagram of a network 700 with the enforcement node150 operating as a snooping proxy 710 to perform SSL interceptionwithout breaking the tunnel as with the interception proxy 510. Thispresents a different approach for SSL interception than the interceptionproxy 510, which avoids the disadvantages of certificate pinning andcertificate management. In the network 700, a tunnel 720 is between theSSL client 402 and the SSL server 404. Again, the tunnel 720 can be SSL,TLS, DTLS, HTTPS, etc. The key difference with the snooping proxy 710relative to the interception proxy 510 is the snooping proxy 710 doesnot break the tunnel 720. Note, the snooping proxy 710 is still a MitMproxy like the interception proxy 510.

The snooping proxy 710 can be one of the enforcement nodes 150 in thecloud-based system 100. Also, the client 402 can be the user device 300including the application 350. As described herein, the application 350is a traffic-forwarding application that enables the user device 300 tooperate (communicate) with the cloud-based system 100. The snoopingproxy 710, being already a MitM proxy, can snoop (monitor) on thehandshake process 400. This snooping can be at the enforcement node 150operating as the snooping proxy 710 as well as at the application 350.This snooping can also use key agents, such as part of the application350, operating system support hooks, such as at the user device 300,etc. The key aspect here is the snooping proxy 710 can snoop thehandshake process 400 for purposes of obtaining keys.

Once the snooping proxy 710 has keys for a given session, the snoopingproxy 710 can monitor the encrypted traffic on the tunnel 720. Note,typically, monitoring in the cloud-based system 100 is inline in a sensethe enforcement node 150 sits directly between the client 402 (the userdevice 300) and the server 404 (or any other destination on the Internet104, the cloud services 106, etc.). Here, the snooping proxy 710 isstill inline. The snooping proxy 710 can receive encrypted traffic, viewand inspect the traffic based on the snooping of the keys, and allow orblock the traffic based on the inspection.

This approach solves the various limitations with a traditional MitMproxy as an interception proxy 510. That is, applications withcertificate pinning now can support SSL inspection to block policyviolations or malware transfers. This removes the need for certificatedeployments with the cloud-based system 100. Also, it is possible todecode any other variant of SSL to inspect or detect applicationsignature (aka DPI) inside an encapsulated layer or protocol. Further,this approach is completely transparent to primitive SSL-basedapplications such as FTPS, which cannot trust MitM root certificates.Finally, this allows granular policy control and transactionalvisibility for critical or productivity applications without breakingthe SSL protocol.

SSL Profile Construction, Learning and Transfer of Knowledge

In either SSL environment, namely the interception proxy 510 and thesnooping proxu 710, for every new connection, the application 350process on the device can create a state machine or the like for thetransaction, and, based on the results of the transaction, the processconstructs a profile for the SSL client 402 which initiated theconnection. For every connection, the process can construct a profilefor the connection as a tuple: <Origin, Host-Name,Destination-Socket-Address, Handshake-Status, Key information>.

The origin is the client application 620, which is originating arequest. The origin information is obtained through a process to portmapping on the host machine. The Host Name is the fully qualified domainname of the SSL server 404 that the SSL client 402 is trying to reach.The hostname is retrieved from the SNI (Server Name Indication) parsedas a TLS extension in the Client Hello SSL record. The DestinationSocket contains information aboutDestination-Server-IP-Address:Destination-Port that the SSL client 402is trying to establish a connection. This information is retrieved byparsing the IP-packet header during connection establishment.

The Handshake Status is a bit flag that keeps a record of SSL handshakemessages exchanged with the SSL server 404. The flag is set to 1 if thehandshake succeeds, and the client starts sending Application Data tothe server. The profile is learned for every transaction and reevaluatedwhenever the SSL client 402 tries to reach the same destination. Thisknowledge is periodically transferred to the cloud-based system 100out-of-band on a persistent control channel that allows the cloud-basedsystem 100 to learn the behavior of client apps 620 with SSLinterception.

To construct this profile, the process passively observes the SSL RecordLayer data messages and keep track of all the records that have beenexchanged for any given transaction. For example, the process can parsethe SSL headers to check if the SSL client 402 returns an SSL alertand/or if application data is sent over the connection. The process canparse the initial (K) server bytes and check the intermediate CAcertificate from the enforcement node 150. The process can find theprocesses and host corresponding to the connection.

The following SSL handshake messages can be recorded:

Client hello to determine the SSL server 404 the SSL client 402 wants toconnect with. The SNI host field provides the information.

Server Hello to determine the server response towards the client requestand client supported ciphers.

A certificate that contains the certificates advertised by the SSLserver 404 and which is used to check if SSL interception is enabled forthe transaction.

Alert (optional), which indicates if the SSL client 402 rejected thecertificate and the reason for rejection.

Application data which indicates the successful handshake since theapplication data is exchanged now.

This process can be extended to generate more detailed profilescontaining the ciphers supported by the SSL client 402 and the SSLserver 404, SSL version, certificate chain, etc.

Every SSL message is sent as part of the Record Layer Protocol whichprovides messages in the following format:

Content type (1 Octet) Version (2 Octets) Length (2 Octets) DataSecurity Functions on Traffic with SSL Inspection, Either with theInterception Proxy or the Snooping Proxy

The cloud-based system 100 can support various security functions onencrypted traffic, including:

Granular URL filtering and cloud app control policies where thecloud-based system 100 can enforce granular user, group, and locationpolicies that not only control access to sites or applications but alsocontrol what a user can do within an application. For example, it ispossible to define a Web email policy that allows users to view and sendmail, but not attachments, or a social media policy that allows users toview Facebook, but not post.

Skipping Inspection for Specific URLs/URL categories: When configuringSSL Inspection policy, it is possible to prevent the service frominspecting sessions to certain URLs or URL categories (for example, inthe Banking and Healthcare URL categories). This list can apply globallythrough an organization as well as granular to users, groups of users,etc.

Skipping Inspection for Specific Cloud Applications/Cloud ApplicationCategories: When configuring SSL Inspection policy, it is possible toprevent the cloud-based system 100 from inspecting transactions tospecific cloud applications or cloud application categories. This listcan apply globally through an organization as well as granular to users,groups of users, etc.

Content Filtering where the cloud-based system 100 is enabled to blockmalicious or inappropriate content in a page, such as during a Googlesearch.

Block Undecryptable Transactions: wherein the cloud-based system 100 isconfigured to block the transactions of applications that thecloud-based system 100 cannot decrypt because of using non-standardencryption methods and algorithms, as well as where snooping fails andwhere the interception proxy 510 encounters certificate pinning.

Block Advanced Persistent Threats (APT) in encrypted traffic. Note, mosttargeted malware is now delivered over SSL.

Control access to Google consumer apps and non-corporate Googleaccounts.

Block access to sites with revoked certificates: The cloud-based system100 supports OCSP (Online Certificate Status Protocol) to verify thevalidity of all server certificates. It verifies the OCSP responder URLin a server's certificate and sends an OCSP request to the responder.The cloud-based system 100 allows access if the responder indicates thatthe certificate is Good, and blocks access if the responder respondsthat the certificate is Unknown or Revoked. The cloud-based system 100displays a notification when it blocks access to a site due to a badcertificate (if the certificate issuer is unknown, or if the certificatehas expired, or if the Common Name in the certificate does not match).It also logs these transactions with “bad server cert” in the policyfield.

Data Loss Prevention (DLP): The cloud-based system 100 can enforce theDLP policy when SSL inspection is enabled.

Of note, the enforcement node 150 can be configured, not as a cachingproxy. Data is inspected in the enforcement node's 150 memory afterdecryption and sent out to the client immediately. Even when a core dumpis taken on the enforcement node 150, SSL (encrypted) session data iscleared before the dump file is created. SSL session data is neverwritten to disk.

SSL Inspection Process by Snooping

FIG. 14 is a flowchart of a process 800 for SSL (or other type ofencrypted traffic) inspection by snooping, such as via a node operatingas the snooping proxy 710. The process 800 contemplates implementationas a method, as a computer-readable code stored on a non-transitorycomputer-readable storage medium for programming the node operating asthe snooping proxy 710, and one the node operating as the snooping proxy710.

The process 800 includes monitoring traffic between a user device andthe Internet (step 801); detecting and monitoring a handshake betweenthe user device and an endpoint for determining keys associated withencryption between the user device and the endpoint (step 802);monitoring encrypted traffic between the user device and the endpointsubsequent to the handshake based on the keys (step 803); and performingone or more security functions on the encrypted traffic based on themonitoring (step 804). The node can be the enforcement node 150 that ispart of a cloud-based security system, i.e., the cloud-based system 100,and configured inline between the user device and the endpoint.

The process 800 can further include one of blocking or allowing theencrypted traffic based on the one or more security functions. The oneor more security functions can include any of access control, threatprevention, and data protection, as described in detail herein. Theendpoint can include an application utilizing certificate pinning. Theprocess 800 can further include obtaining data related to the keys froma traffic-forwarding application executed on the user device. Theprocess 800 can further include blocking the encrypted trafficresponsive to being unable to decrypt the encrypted traffic with thekeys.

It will be appreciated that some embodiments described herein mayinclude one or more generic or specialized processors (“one or moreprocessors”) such as microprocessors; Central Processing Units (CPUs);Digital Signal Processors (DSPs): customized processors such as NetworkProcessors (NPs) or Network Processing Units (NPUs), Graphics ProcessingUnits (GPUs), or the like; Field Programmable Gate Arrays (FPGAs); andthe like along with unique stored program instructions (including bothsoftware and firmware) for control thereof to implement, in conjunctionwith certain non-processor circuits, some, most, or all of the functionsof the methods and/or systems described herein. Alternatively, some orall functions may be implemented by a state machine that has no storedprogram instructions, or in one or more Application-Specific IntegratedCircuits (ASICs), in which each function or some combinations of certainof the functions are implemented as custom logic or circuitry. Ofcourse, a combination of the aforementioned approaches may be used. Forsome of the embodiments described herein, a corresponding device inhardware and optionally with software, firmware, and a combinationthereof can be referred to as “circuitry configured or adapted to,”“logic configured or adapted to,” etc. perform a set of operations,steps, methods, processes, algorithms, functions, techniques, etc. ondigital and/or analog signals as described herein for the variousembodiments.

Moreover, some embodiments may include a non-transitorycomputer-readable storage medium having computer-readable code storedthereon for programming a computer, server, appliance, device,processor, circuit, etc. each of which may include a processor toperform functions as described and claimed herein. Examples of suchcomputer-readable storage mediums include, but are not limited to, ahard disk, an optical storage device, a magnetic storage device, aRead-Only Memory (ROM), a Programmable Read-Only Memory (PROM), anErasable Programmable Read-Only Memory (EPROM), an Electrically ErasableProgrammable Read-Only Memory (EEPROM), Flash memory, and the like. Whenstored in the non-transitory computer-readable medium, software caninclude instructions executable by a processor or device (e.g., any typeof programmable circuitry or logic) that, in response to such execution,cause a processor or the device to perform a set of operations, steps,methods, processes, algorithms, functions, techniques, etc. as describedherein for the various embodiments.

Although the present disclosure has been illustrated and describedherein with reference to preferred embodiments and specific examplesthereof, it will be readily apparent to those of ordinary skill in theart that other embodiments and examples may perform similar functionsand/or achieve like results. All such equivalent embodiments andexamples are within the spirit and scope of the present disclosure, arecontemplated thereby, and are intended to be covered by the followingclaims.

What is claimed is:
 1. A non-transitory computer-readable storage mediumhaving computer-readable code stored thereon for programming a nodeoperating as a snooping proxy to perform steps of: monitoring trafficbetween a user device and the Internet; detecting and monitoring ahandshake between the user device and an endpoint for determining keysassociated with encryption between the user device and the endpoint;monitoring encrypted traffic between the user device and the endpointsubsequent to the handshake based on the keys; and performing one ormore security functions on the encrypted traffic based on themonitoring.
 2. The non-transitory computer-readable storage medium ofclaim 1, wherein the node is part of a cloud-based security system andconfigured inline between the user device and the endpoint.
 3. Thenon-transitory computer-readable storage medium of claim 1, wherein thesteps further include one of blocking or allowing the encrypted trafficbased on the one or more security functions.
 4. The non-transitorycomputer-readable storage medium of claim 1, wherein the one or moresecurity functions include any of access control, threat prevention, anddata protection.
 5. The non-transitory computer-readable storage mediumof claim 1, wherein the endpoint includes an application utilizingcertificate pinning.
 6. The non-transitory computer-readable storagemedium of claim 1, wherein the steps further include obtaining datarelated to the keys from a traffic-forwarding application executed onthe user device.
 7. The non-transitory computer-readable storage mediumof claim 1, wherein the steps further include blocking the encryptedtraffic responsive to being unable to decrypt the encrypted traffic withthe keys.
 8. A node comprising: a network interface communicativelycoupled to a network; a processor communicatively coupled to the networkinterface; and memory storing computer-executable instructions that,when executed, cause the processor to monitor traffic between a userdevice and the Internet; detect and monitor a handshake between the userdevice and an endpoint for determining keys associated with encryptionbetween the user device and the endpoint; monitor encrypted trafficbetween the user device and the endpoint subsequent to the handshakebased on the keys; and perform one or more security functions on themonitored encrypted traffic.
 9. The node of claim 8, wherein the node ispart of a cloud-based security system and configured inline between theuser device and the endpoint.
 10. The node of claim 8, wherein thecomputer-executable instructions further cause the processor to one ofblock or allow the encrypted traffic based on the one or more securityfunctions.
 11. The node of claim 8, wherein the one or more securityfunctions include any of access control, threat prevention, and dataprotection.
 12. The node of claim 8, wherein the endpoint includes anapplication utilizing certificate pinning.
 13. The node of claim 8,wherein the computer-executable instructions further cause the processorto obtain data related to the keys from a traffic-forwarding applicationexecuted on the user device.
 14. The node of claim 8, wherein thecomputer-executable instructions further cause the processor to blockthe encrypted traffic responsive to being unable to decrypt theencrypted traffic with the keys.
 15. A method comprising: in a nodeoperating as a snooping proxy, monitoring traffic between a user deviceand the Internet; detecting and monitoring a handshake between the userdevice and an endpoint for determining keys associated with encryptionbetween the user device and the endpoint; monitoring encrypted trafficbetween the user device and the endpoint subsequent to the handshakebased on the keys; and performing one or more security functions on theencrypted traffic based on the monitoring.
 16. The method of claim 15,wherein the node is part of a cloud-based security system and configuredinline between the user device and the endpoint.
 17. The method of claim15, further comprising one of blocking or allowing the encrypted trafficbased on the one or more security functions.
 18. The method of claim 15,wherein the one or more security functions include any of accesscontrol, threat prevention, and data protection.
 19. The method of claim15, wherein the endpoint includes an application utilizing certificatepinning.
 20. The method of claim 15, further comprising obtaining datarelated to the keys from a traffic-forwarding application executed onthe user device.